<?php
$this->Html->addCrumb('<i class="fa fa-home"></i> ' . Inflector::camelize($this->request->params ['prefix']), '/' . $this->request->params ['prefix'] . '/', array('escape' => false));
$this->Html->addCrumb(__('Carts'), array('prefix' => $this->request->params['prefix'], 'controller' => $this->request->params['controller'], 'plugin' => $this->request->params['plugin'], 'action' => 'index'), array('escape' => false));
$this->Html->addCrumb(__('List'), NULL, array('escape' => false));

$this->Html->setAcoes('<i class="fa fa-search"></i>' . __('List'), array('action' => 'index'), array('title' => __('List'), 'class' => 'btn btn-info', 'escapeTitle' => false));
$this->Html->setAcoes('<i class="fa fa-file-text-o"></i>' . __('Export'), array('action' => 'export'), array('title' => __('Export'), 'class' => 'btn btn-default', 'escapeTitle' => false));
?>


<?php if (count($carts) > 0) { ?>
    <div class="table-responsive">
        <table class="table table-bordered table-hover table-condensed">
            <thead>
                <tr>
                    <th><?php echo $this->Paginator->sort('Cart.id', __('ID')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.sessionid', __('Sessionid')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.name', __('Name')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.weight', __('Weight')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.price', __('Price')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.quantity', __('Quantity')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.weight_total', __('Weight_total')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.subtotal', __('Subtotal')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.created', __('Created')); ?></th>
                    <th><?php echo $this->Paginator->sort('Cart.modified', __('Modified')); ?></th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($carts as $cart) { ?>
                    <tr>
                        <td><?php echo h($cart['Cart']['id']); ?></td>
                        <td><?php echo h($cart['Cart']['sessionid']); ?></td>
                        <td><?php echo h($cart['Cart']['name']); ?></td>
                        <td><?php echo h($cart['Cart']['weight']); ?></td>
                        <td><?php echo $this->Formatacao->moeda($cart['Cart']['price']); ?></td>
                        <td><?php echo h($cart['Cart']['quantity']); ?></td>
                        <td><?php echo $this->Formatacao->moeda($cart['Cart']['weight_total']); ?></td>
                        <td><?php echo $this->Formatacao->moeda($cart['Cart']['subtotal']); ?></td>
                        <td><?php echo $this->Formatacao->dataHora($cart['Cart']['created']); ?></td>
                        <td><?php echo $this->Formatacao->dataHora($cart['Cart']['modified']); ?></td>
                    </tr>
                <?php } ?>
            </tbody>
        </table>
    </div>
    <?php echo $this->Paginator->pagination(); ?>
    <?php
} else {
    echo $this->element('sem_registro');
}
?>